package kr.hkit.androidcomplete02.ch13;

import kr.hkit.androidcomplete02.R;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.Window;

public class ProgressTitle extends Activity {
	int mProg;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// 
		super.onCreate(savedInstanceState);
		
		requestWindowFeature(Window.FEATURE_PROGRESS);
		setContentView(R.layout.ch13_progresstitle);
		mProg = 5000;
		setProgress(mProg);
		setProgressBarVisibility(true);
	}
	
	public void mOnClick(View v){
		switch(v.getId()){
		case R.id.ch13_progresstitle_decfirst:
			if(mProg >= 200)
				mProg = mProg -200;
			setProgress(mProg);
			break;
		case R.id.ch13_progresstitle_incfirst:
			if(mProg <=9800)
				mProg = mProg +200;
			setProgress(mProg);
		}
	}
}
